For previous users of Pocket Forth, changes since release 4 are discussed in this document. Most of the changes have been made to make Pocket Forth compatible with the current system. Nearly all existing programs will run on this version without modification.
Pocket Forth release 5 brings Pocket Forth into the future with System 7 support while retaining the ability to run on any Macintosh & System combination that you may have. The following systems have been used to debug and test Pocket Forth:
Macintosh (128) System 2 (Finder 1.1g) - System 3.2
Macintosh (512) System 2 (Finder 1.1g) - System 4.1
Macintosh plus System 2 (Finder 1.1g) - System 7.0
Macintosh SE System 4.2 - System 7.0
Macintosh LC System 6.0.7 - System 7.0
Macintosh IIcx System 6.0.5 - System 7.0
Macintosh IIsi System 6.0.7 - System 7.0
I have no reason to believe that other systems would not work as well, but I don't have access to them.
New features:
Multitasking: The application version of Pocket Forth now supports multitasking when running under an operating system that supports it (Multifinder and System 7). It does this with the trap WaitNextEvent called with zero sleep ticks and a nil mouse region. The DA version has always supported multitasking.
Window Zooming: Although you don't see a zoom box in Pocket Forth's application window, the hooks are available to zoom the window. Handlers for a click in the ZoomIn and ZoomOut regions are located at 182 +md and 184 +md respectively. You may add a zoom box to the WIND (ID=128) resource with ResEdit.
32 Bit Cleanliness: While the DA version has always been 32 bit clean, release 5 of the application is the first not to strip the high byte off addresses by brute force. Version 0.5 determines at runtime if it is running in a 32 bit clean environment. If so, addresses are left intact.
High Level Events: All events with an event number higher than 16 are handled through a handler located at 188 +md. Standard high level events as described in Inside Mac VI are event number 23, however the handler has been made to accommodate all events with a high number. If you wish to handle high level events, set the HighLevelAware bit of the SIZE (ID =1) resource.
New File Menu: The File menu has been changed to reflect a more standard file menu. The menu now has Open, Save Dictionary, Debugger, Print and Quit items. As always, these items are default; you may change them as you wish.
Open: This item displays a dialog box for selecting a text file to be interpreted. The file is then handled exactly as if it had been loaded with "-->". Since "-->" requires a complete path name, Open is preferred for files not in the same directory as the Pocket Forth application. The word "open" has been added to the dictionary.
Save Dictionary: Selecting the Save Dictionary item, from the File Menu, saves any changes to the dictionary of the Pocket Forth application. The changes are not easily undone, and your choice is not confirmed, so be sure that you mean to select save. Notice that the changes are to Pocket Forth itself, not to a source code file. Because this command has irreversible effects, a keyboard equivalent is not used.
Debugger: This item was available on previous versions as Mon. The new title is more informative. YOU MUST HAVE A DEBUGGER (such as TMON, MacsBug, etc.) INSTALLED TO USE THIS COMMAND, otherwise you will get a visit from Mr. Bomb Box. Should you see the bomb box, the Continue (or Resume on older systems) button will beat a hasty retreat from Pocket Forth.
Print: This item just beeps, since there is no document to print. To print source files, use your text editor. The Print command is present to be compatible with programmatic print requests.
Quit: Just Quits, doesn't ask for confirmation.
Balloon Help: Yup, just like the big guys, the Pocket Forth application has help balloons ready to explain the use of its menus, window, dialogs and icon. The format of each help resource is in the source code for you to examine.
Color Icon: Professionally drawn icons have been included with the application and the DA for System 7. The human interface guidelines have been followed in its design so it looks good with all the other stuff out on your desktop or tucked away in a folder.
New Text Files: The example and extension text files have been rewritten, updated and debugged. New text files have been added to bring additional capabilities to Pocket Forth, and serve as examples of programming.
The file 'BareBones' strips the System 7 and color resources, leaving the program about half the original size with all programming capabilities intact.
The Manual and Glossary are now Microsoft Word documents formatted for a laser printer.
NOTE: Use only positive arguments with "+loop". Negative arguments will not terminate properly. If you must count down, count up within the loop and subtract the index from a constant. Thanks to Steve Hawley for reporting this problem.